<template>
  <div id="root">
    用户信息显示
    {{ this.user }}
    {{ this.data }}
  </div>
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue";
import axios from "axios";
export default {
  name: "App",
  components: {
    HelloWorld,
  },
  methods: {},
  data() {
    return {
      user: "张三",
      data: [],
    };
  },
  mounted() {
    let p = axios.get("https://jsonplaceholder.typicode.com/users");
    p.then((res) => {
        this.data = res.data
    });
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
